\mode<presentation>

\newif\ifbeamer@secheader
\beamer@secheaderfalse

%\DeclareOptionBeamer{secheader}{\beamer@secheadertrue}
\ProcessOptionsBeamer

\useoutertheme[footline=authorinstitutetitle,subsection=false]{smoothbars}
\makeatletter
\newcommand{\frameofframes}{/}
\newcommand{\setframeofframes}[1]{\renewcommand{\frameofframes}{#1}}

% \setbeamercolor{section in foot}{fg=white, bg=UoW}
\setbeamercolor{section in foot}{fg=white, bg=SUT}
% \setbeamercolor{subsection in foot}{fg=UoW, bg=LightGrey}
\setbeamercolor{subsection in foot}{fg=SUT, bg=LightGrey}


\makeatletter
\setbeamertemplate{footline}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.3\paperwidth,ht=2.25ex,dp=1ex,center]{section in foot}%
    CE Department~(Sharif University of Technology)
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.4\paperwidth,ht=2.25ex,dp=1ex,center]{subsection in foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.3\paperwidth,ht=2.25ex,dp=1ex,right]{section in foot}%
    \today \hspace*{12ex} \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
  \end{beamercolorbox}}%
  \vskip0pt%
}
\makeatother

  
\useinnertheme{circles}

%\useoutertheme{default}
%\useinnertheme[shadow=true]{rounded}
\xdefinecolor{LightGrey}{RGB}{228,228,228}
\xdefinecolor{UoW}{RGB}{0,22,65} 
\xdefinecolor{SUT}{RGB}{45,50,145}
%\setbeamercolor{footline}{bg=UoW}
\setbeamercolor{footline}{bg=SUT}
% \setbeamercolor{frametitle}{bg=UoW,fg=white}
\setbeamercolor{frametitle}{bg=SUT,fg=white}
% \setbeamercolor{title}{bg=UoW}
\setbeamercolor{title}{bg=SUT}
\setbeamerfont{frametitle}{size=\large}
%\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{bibliography item}[text]
\setbeamertemplate{caption}[numbered]

\setbeamercolor{palette primary}{use=structure,fg=white,bg=structure.fg}
\setbeamercolor{palette secondary}{use=structure,fg=white,bg=structure.fg!75!black}
\setbeamercolor{palette tertiary}{use=structure,fg=white,bg=structure.fg!50!black}
\setbeamercolor{palette quaternary}{fg=white,bg=structure.fg!50!black}
%\setbeamercolor*{sidebar}{use=structure,bg=structure.fg}
\setbeamercolor{titlelike}{parent=palette primary}

%% try
% \setbeamercolor{block title}{bg=UoW,fg=white}
\setbeamercolor{block title}{bg=SUT,fg=white}
\setbeamercolor*{block title example}{use={normal text,example text},bg=white,fg=UoW}
\setbeamercolor{fine separation line}{}
\setbeamercolor{item projected}{fg=white}
\setbeamercolor{palette sidebar primary}{use=normal text,fg=normal text.fg}
\setbeamercolor{palette sidebar quaternary}{use=structure,fg=structure.fg}
\setbeamercolor{palette sidebar secondary}{use=structure,fg=structure.fg}
\setbeamercolor{palette sidebar tertiary}{use=normal text,fg=normal text.fg}
%\setbeamercolor{palette sidebar quaternary}{fg=white}
\setbeamercolor{section in sidebar}{fg=brown}
\setbeamercolor{section in sidebar shaded}{fg=grey}
\setbeamercolor{separation line}{}
% \setbeamercolor{sidebar}{bg=UoW}
\setbeamercolor{sidebar}{bg=SUT}
\setbeamercolor{sidebar}{parent=palette primary}
% \setbeamercolor{structure}{fg=UoW}
\setbeamercolor{structure}{fg=SUT}
\setbeamercolor{subsection in sidebar}{fg=brown}
\setbeamercolor{subsection in sidebar shaded}{fg=grey}
\AtBeginSection[]{
	\begin{frame}
		\tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/hide,subsubsectionstyle=show/shaded/hide]
	\end{frame}
}
\AtBeginSubsection[]{
	\begin{frame}
		\tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/hide,subsubsectionstyle=show/shaded/hide]
	\end{frame}
}

\mode
<all>
